<%= render App::ShareFormComponent.new title: "Save to Pinboard", icon: "icon-share-pinboard" do %>
  <%= form_tag("", remote: true) do %>
    <%= hidden_field_tag :url, "", class: "url-placeholder" %>
    <div class="mb-4">
      <%= render Form::TextInputComponent.new do |text| %>
        <% text.label_content do %>
          <label for="pinboard_title">Title</label>
        <% end %>
        <% text.input do %>
          <%= text_field_tag :description, "", class: "title-placeholder peer text-input", id: "pinboard_title" %>
        <% end %>
      <% end %>
    </div>

    <div class="mb-4">
      <%= render Form::TextInputComponent.new do |text| %>
        <% text.label_content do %>
          <label for="pinboard_description">Description</label>
        <% end %>
        <% text.input do %>
          <%= text_area_tag :extended, "", rows: 5, class: "description-placeholder peer text-input", id: "pinboard_description" %>
        <% end %>
      <% end %>
    </div>

    <div class="mb-4">
      <%= render Form::TextInputComponent.new do |text| %>
        <% text.label_content do %>
          <label for="pinboard_tags">Tags</label>
        <% end %>
        <% text.input do %>
          <%= text_field_tag :tags, "", class: "peer text-input", placeholder: "space separated", id: "pinboard_tags" %>
        <% end %>
      <% end %>
    </div>

    <div class="mb-4 flex gap-4">
      <div>
        <%= check_box_tag :shared, "no", false, class: "peer" %>
        <label for="shared" class="group flex gap-2 items-center">
          <%= render Form::CheckboxComponent.new %>
          Private
        </label>
      </div>
      <div>
        <%= check_box_tag :toread, "yes", false, class: "peer" %>
        <label for="toread" class="group flex gap-2 items-center">
          <%= render Form::CheckboxComponent.new %>
          Read Later
        </label>
      </div>
    </div>

    <%= render Settings::ButtonRowComponent.new do %>
      <%= button_tag "Cancel", type: "button", class: "button button-secondary", data: {behavior: "close_entry_basement"} %>
      <%= button_tag "Save", type: "submit", class: "button" %>
    <% end %>

  <% end %>
<% end %>
